var regex = /t(e)(st(\d?))/g;
var string = 'test1test2test3';

const matchs = [];
let match;

while (match = regex.exec(string)) {
    matchs.push(match);
}
// console.log(matchs)


var arrays = string.matchAll(regex);
// console.log([...arrays])
// console.log(Array.from(arrays))

for (const match of arrays) {
    console.log(match)
}


zw_gbpx_task_permission_extend1

